package main.cn.service.impl;

import main.cn.dao.CarDao;
import main.cn.dao.impl.CarDaoImpl;
import main.cn.pojo.Car;
import main.cn.service.CarService;

import java.util.List;


public class CarServiceImpl implements CarService {

    private CarDao carDao = new CarDaoImpl();

    @Override
    public void addCar(Car car) {
        carDao.addCar(car);
    }

    @Override
    public void deleteCarById(int vid) {
        carDao.deleteCar(vid);
    }

    @Override
    public void updateCar(Car car) {
        carDao.updateCar(car);
    }

    @Override
    public Car queryCarById(int vid) {
        return carDao.queryCarById(vid);
    }


    @Override
    public List<Car> queryCars() {
        return carDao.queryCars();
    }
}
